const { settingModel } = require('../models/model/setting');
const { dataToJSON, dataDeleteOrUpdateRes } = require('../utils/tools');

// 修改
exports.updateService = async (data, id, next) => {
	const res = await settingModel.update(data, { where: {} });
	return dataDeleteOrUpdateRes(res);
};

// 查全部
exports.findByPageService = async () => {
	const res = await settingModel.findAll();
	return JSON.parse(JSON.stringify(res))?.[0];
};
